﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Linq.Expressions;

namespace Medianamik.Core.Querying
{
    public class PropertyWhere : IQueryWhere
    {
        public PropertyWhere(NodeTypeProperty pProperty, Comparison pComparison, object pValue)
        {
            Property = pProperty;
            Comparison = pComparison;
            Value = pValue;
        }

        public NodeTypeProperty Property
        {
            get;
            private set;
        }

        public Comparison Comparison { get; private set; }

        public object Value { get; private set; }

        #region IQueryWhere Members

        object IQueryWhere.Subject
        {
            get { return Property; }
        }

        #endregion

        public bool IsArray
        {
            get
            {
                return Value is Array;
            }
        }
    }
}
